package com.springcloud.test;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;


/**
 * @Desc: 消费者
 * ----------------
 * @CLASS_NAME: SinkReceiver
 * ----------------
 * @Author: jovi
 * ----------------
 * @Date: 2020-03-27 17:00
 */
@Slf4j
@EnableBinding({Sink.class})
public class SinkReceiver {


    @StreamListener(Sink.INPUT)
    public void receive(Object payload) {
        log.info("Received:" + payload);
    }

}
